<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Survey extends CI_Controller {
	
	/** 
	 *	Academic survey Page
	 *	成本收益问卷调研页面
	 *
	 */

	public function __construct() {
		parent::__construct();
		$this->load->model('options_model');
		$this->load->model('register_model');
		$this->load->library('form_validation');
	}
	
	public function index($id = 1) {
		$data['title'] = '调查问卷';

		if($id == 1) {
			$this->load->view('survey/cost', $data);
			$this->load->view('templates/footer');
		}

		if($id == 2) {
			$this->load->view('survey/benefit', $data);
			$this->load->view('templates/footer');
		}

	}

	public function create() {
		$this->form_validation->set_rules('total_area', '种植面积', 'required');

		if($this->form_validation->run() == FALSE) {
			$this->index();
		}
		else {
			$this->survey_model->set_survey_main();
		}
	}
}

/* End of file survey.php */
/* Location: ./application/controllers/survey.php */